#This is a application to test the switch controller and the 7 seg hex controller 
.text 
	lui $1, 0xFFFF #creating memory mapped io mask
	lui $5, 0x00FF #create seven seg edit digit mask
	ori $6, $5, 0xABCD # intial valies
	ori $7, $5, 0x1234 # non-switched value
	ori $5, $5, 0xEFAB # swtiched value 
	ori $2, $2, 0xF
	sw $6, 0x84($1)

doStuff:	lw $2, 0x40($1) # loading the switches
		#sw $2, 0x00($1) #save back out to leds for debugging sake
		srl $3, $2, 4 # get bits 7-4
		xori $3, $3, 0xA
		beqz $3, enableDigit
		andi $3, $2, 0x00F0
		sw $3, 0x00($1)
		beqz $3, setDigits
		sw $7, 0x084($1)
		j doStuff
		
enableDigit: 	andi $2, $2, 0xF
		sw $2, 0x80($1)
		j doStuff

setDigits: 	
		sw $5, 0x84($1)
		j doStuff
